#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include "appGlobals.h"
#include <QMainWindow>
class Document;

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
	friend class HintManager;
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

	// workaround to removing menu with clear() because there is no method removeMenu() to remove particular one
	void reinitializeGui();
private:
    void initGui();
	void createConnections();
    Ui::MainWindow *ui;

	QPointer<QMenu> m_editMenu;
	QPointer<QAction> m_editUndoAct;
	QPointer<QAction> m_editRedoAct;

	QPointer<QMenu> m_modeMenu;
	QPointer<QAction> m_objectsModeAct;
	QPointer<QAction> m_levelEditorModeAct;
	QPointer<QAction> m_previewModeAct;

	QToolBar* m_pModeToolBar;
public slots:
    void onDocumentChanged(QPointer<Document> document);
	void updateGui();
private slots:
	void onFileNew();
	void onFileClose();
	void onModeChanged();
};

#endif // MAINWINDOW_H
